package kr.saeildamil.androidstudty.ch19;

import android.os.Handler;
import android.os.Message;

public class BackThreadObtain extends Thread {
	int mBackValue = 0;
	Handler mHandler;

	BackThreadObtain(Handler handler) {
		mHandler = handler;
	}

	public void run() {
		while (true) {
			mBackValue++;
			Message msg = Message.obtain(mHandler, 0, mBackValue, 0);
			mHandler.sendMessage(msg);
			try { Thread.sleep(1000); } catch (InterruptedException e) {;}
		}
	}
}
